public class AbilityRetriever {
  Scanner sc = null;
  String next;

  public int[] getEffect(String name) {
    sc = new Scanner(createReader("Abilities.txt"));
    sc.useDelimiter(",");
    try {
      next = sc.next();
      while (sc.hasNext () && !next.equals(name)) {
        sc.nextLine();
        next = sc.next();
      }    
      int[] r = {sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt()};
      return r;
    }
    catch(Exception e) {
    }
    return new int[4];
  }
}

